<template>
  <div id="app">
    <hm-form :model="model"  label-width="100px">
      <hm-form-item label="用户名">
        <hm-input placeholder="请输入用户名" v-model="model.username"></hm-input>
      </hm-form-item>
      <hm-form-item label="选择">
        <hm-switch v-model="model.active"></hm-switch>
      </hm-form-item>
    </hm-form>
  </div>
</template>
<script>
import HmInput from './components/input'
export default {
  name: 'App',
  components: { HmInput },
  data () {
    return {
      model: {
        username: '',
        active: true
      }
    }
  },
  methods: {
    fn () {
      console.log('点击了按钮')
    }
  }
}
</script>

<style lang="scss">
  .row {
    margin-bottom: 20px;
    .hm-button {
      margin-right: 20px;
    }
  }
</style>
